package cn.framelife.rainbow.db.oracle;

import java.sql.Connection;

import cn.framelife.rainbow.constant.Constant;
import cn.framelife.rainbow.db.DatabaseMessage;
import cn.framelife.rainbow.db.TypeCoversion;
import cn.framelife.rainbow.db.creator.CodeCreator;
import cn.framelife.rainbow.db.creator.part.EntityCreator;
import cn.framelife.rainbow.ui.entity.ReverseProperty;
import cn.framelife.rainbow.util.DatabaseCache;

/**
 * Oracle的代码生成类
 * 
 * @author 潘广伟 p_3er@qq.com  
 * @date 2014-1-6 下午4:50:15
 */
public class OracleCodeCreator extends CodeCreator{
	private EntityCreator entityCreator;
	
	public void init(ReverseProperty reverseProperty) throws Exception{
		DatabaseMessage databaseMessage = new DatabaseMessage();
		databaseMessage.setCoversion(new TypeCoversion(Constant.ORACLE2JAVAFILE));
		databaseMessage.setDialect(Constant.ORACLEDIALECT);
		databaseMessage.setProjectName(reverseProperty.getSelectionProjectName());
		entityCreator = new OracleEntityCreator(databaseMessage);
		super.reverseProperty = reverseProperty;
		super.dialect = databaseMessage.getDialect();
		super.entityCreator = entityCreator;
	}
	
}
